package conf

type serverConfig struct {
	Port string `yaml:"port" default:":8080"`
	Mode string `yaml:"mode" default:"debug"`
}

type databaseConfig struct {
	Driver          string `yaml:"driver" default:"mysql"`
	Host            string `yaml:"host" default:"localhost"`
	Port            string `yaml:"port" default:"3306"`
	Username        string `yaml:"username" default:"root"`
	Password        string `yaml:"password" default:"123456"`
	Database        string `yaml:"database" default:"test"`
	Charset         string `yaml:"charset" default:"utf8mb4"`
	MaxIdleCount    *int   `yaml:"maxIdleCount" default:"10"`
	MaxOpenConns    *int   `yaml:"maxOpenConns" default:"100"`
	ConnMaxLifetime *int   `yaml:"connMaxLifetime" default:"60"`
}

type redisConfig struct {
	Host         string `yaml:"host" default:"localhost"`
	Port         string `yaml:"port" default:"6379"`
	Password     string `yaml:"password" default:""`
	Db           *int   `yaml:"db" default:"0"`
	PoolSize     *int   `yaml:"poolSize" default:"20"`
	MinIdleConns *int   `yaml:"minIdleConns" default:"5"`
	MaxConnAge   *int   `yaml:"maxConnAge" default:"30"`
	PoolTimeout  *int   `yaml:"poolTimeout" default:"30"`
}

type logConfig struct {
	Level string `yaml:"level" default:"debug"`
	Path  string `yaml:"path" default:"./logs"`
}

type jwtConfig struct {
	Secret string `yaml:"secret" default:"123456"`
}
